package org.blade.personal.mode.codegen;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity
@Table(name = "TableDefine")
public class TableDefine extends BaseEntity{

	public TableDefine(String alias) {
		super(alias);
	}
	
	public TableDefine(){
		
	}

	@Column(name="name")
	private String name;

	@Id
	@Column(name="id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;

	@Column(name="uuid")
	private String uuid;

	@Column(name="code")
	private String code;

	@Column(name="db_type")
	private String dbType;

	@Column(name="owner_id")
	private Long ownerId;

	@Column(name="modifier")
	private Long modifier;

	@Column(name="creation_date")
	private String creationDate;

	@Column(name="pkg_id")
	private Long pkg_id;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Long getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public String getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(String creationDate) {
		this.creationDate = creationDate;
	}

	public String getDbType() {
		return dbType;
	}

	public void setDbType(String dbType) {
		this.dbType = dbType;
	}

	public Long getPkg_id() {
		return pkg_id;
	}

	public void setPkg_id(Long pkg_id) {
		this.pkg_id = pkg_id;
	}
	
	public static void main(String[] args) {
		
		TableDefine td = new TableDefine(" td");
		td.setCode("dddd");
		td.setOwnerId(0L);
		Object[] params = td.getQueryParam();
		System.out.println(params[0]);
		System.out.println(params[1]);
		System.out.println(td.getQuerySql());
	}
	
}
